
compiler_plugin "FS.Plugins.Ext.CollectionCheck"
{
    desc            =   "Allows checking if a collection is not null/emtpy and has at least 1 item.";
    examples        =   [ 'any items ?', 'var items = [1, 2, 3]; if any items ? then print yes' ];
    type            =   "expr";
    precedence      =   1;  
    grammar_match   =   "$start:@starttoken $varname:@identsymbol \\? @exprTerminators";
	start_tokens    =   {	"any" : "any"  }
    build           =   function(args)
                        {       
                            return sys.compiler.ToListCheck( args["varname"], args["start"] );
                        }
}